/*
 * @Date: 2025-09-09 11:23:16
 * @Auth: 873768511@qq.com
 * @LastEditors: 463997479@qq.com
 * @LastEditTime: 2025-09-28 00:48:06
 * @FilePath: \corpus\src\pages\resourceManagement\list\component\KnowledgeDawer\index.tsx
 */
import { PageContainer, ProColumns, ProList } from '@ant-design/pro-components';
import hooks from '../../hooks';
import useProTableConfig from '../../hooks/useProTableConfig';
import styles from './index.less';

const KnowledgeDawer = () => {
  const {
    getKnowledgeChunkContent,
  } = hooks.useContainer();
  const proTableConfig = useProTableConfig({
    optionRender(config, props, dom) {
      return [...dom.reverse()];
    },
  });
  const columns: ProColumns<any>[] = [
    {
      title: '序号',
      width: 60,
      render: (_, __, index) => index + 1,
    },

    {
      title: '',
      width: 126,
      dataIndex: 'chunkContent',
    },
  ];

  return (
    <PageContainer header={{ title: '' }}>
      <div className={styles.detailContainer}>
     
        <ProList<any>
          search={false}
          rowKey="name"
          columns={columns}
          headerTitle=""
          request={getKnowledgeChunkContent.runAsync}
          metas={{
            title: {
              dataIndex: 'chunkContent',
              title: '用户',
            },
          }}
          pagination={{
            pageSize: 50,
          }}
        />
      </div>
    </PageContainer>
  );
};

export default () => {
  return (
    <hooks.Provider>
      <KnowledgeDawer />
    </hooks.Provider>
  );
};
